fix: avoid double signature check#2686
Closed
joske wants to merge 1 commit intoProvableHQ:stagingfrom
Closed
Conversation
ecfe3d7 to
7fbc5ad
Compare
kaimast
requested changes
May 19, 2025
Collaborator
kaimast
left a comment
There was a problem hiding this comment.
Looks mostly good to me. I added a note about additional documentation. Imho, every new public function should be documented.
Would it be hard to add unit tests, by the way? There might already be some tests for BatchCertificate::from that you could just adopt.
Final note: Have you thought about adding another from_* constructor instead? As of now, this new function is only called right before BatchCertificate::from_unchecked.
| Ok(Self { batch_header, signatures }) | ||
| } | ||
|
|
||
| pub fn check_signature_basic(batch_header: &BatchHeader<N>, signatures: &IndexSet<Signature<N>>) -> Result<()> { |
Collaborator
There was a problem hiding this comment.
Could you document this function? It should be clear what it does compared to the checks in BatchCertificate::from.
Maybe you could document BatchCertificate::from a little better as well.
Contributor
Author
|
@kaimast I'm no longer assigned to Aleo, sorry |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation
Avoid double signature verification: ProvableHQ/snarkOS#3558
Test Plan
manually tested
Related PRs
ProvableHQ/snarkOS#3598